<?php

class Txy_Util_DecodeDescription {
	public function decodeString($description){
		
	}
	
	private function getHrefArray($string){
		preg_match_all('/<a href="(.*)">/',$string,$hrefArray); 
		
	}
	
	private function validateUrl($share_url){
    	if(!filter_var($share_url,FILTER_VALIDATE_URL)){
        	return false;
    	}
    	$parse = parse_url($share_url);
    	if('detail.tmall.com'!=$parse['host']&&'item.taobao.com'!=$parse['host']){
    		return false;
    	}
    	
		if(!isset($parse['query']))
		{
			return false;
        }else{
        	 parse_str($parse['query'],$params);
        	 if(isset($params['id'])){
				$id = $params['id'];
				return $id;
        	 }else{
        	 	return false;
        	 }
        }
    	return false;
    }
	
}

?>